<?
require("config.php");

$show_backnav = "menu";
$location_status .= "| Delete";


$menutype = 2;

if (NULL!=$action){

   $Query = "delete from $table where id=$id Limit 1";

   myQuery($Query);


   header("location:" . $rela_path . "share/msg.php?v=7232&label=" . $Trainer);

   exit();

}


if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
  
}

$Query = "select 
	code,
	trainer,
	date,
	name,
details,
picture1,
picture2,
picture3,
picture4,
status,
publish_date 
from $table where id='$id' Limit 1";
$r = myQuery($Query);




	$Code=		$r[0][0];
	$Trainer=	$r[0][1];
	$Date=	$r[0][2];
	$Name=	$r[0][3];
$Details=$r[0][4];
$Picture1=$r[0][5];
$Picture2=$r[0][6];
$Picture3=$r[0][7];
$Picture4=$r[0][8];
$Status=$r[0][9];
$Publish_date=$r[0][10];

require($rela_path . "inc/header.php");
require($rela_path . "bin/date.php");
?>

<!--Content Start-->
<form action="" method="post" enctype="multipart/form-data" name="form1">  
<!--hidden filed-->
<input name="id" type="hidden" value="<?print($id)?>">
<input name="action" type="hidden" value="delete">
<?

if ($label){

	echo "<input type=\"hidden\" name=\"Trainer\" value=\"$label\">";

}

?>


  <table width="95%" border="0" align="center">
                      <tr> 
                        
      <td>&nbsp; </td>
                      </tr>
                      <tr> 
                        
      <td><strong>Are you sure to delete this Trainer Sharing?</strong> <input type="Submit" class="button" name="Button" value="   Yes   "> 
        <input type="button" class="button" name="Submit2" value="   No   " onClick="Redirect('menu.php?label=<?=$label?>',1);"> 
        <br>
        <br>

        <table border="0">



          <tr> 
            <td class="tdheader">Trainer :</td>
            <td>
			
<?=$Trainer?>  			
			
            </td>
          </tr>





          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td class="tdheader">Code :</td>
            <td> <?print($Code)?> </td>
          </tr>

          <tr> 
            <td class="tdheader">Date :</td>
            <td> <?=$Date?> 
            </td>
          </tr>

          <tr> 
            <td class="tdheader">Title :</td>
            <td> <?=$Name?>
            </td>
          </tr>





          <tr>
            <td class="tdheader">Details :</td>
            <td><?print($Details)?></td>
          </tr>

          <tr> 
            <td class="tdheader">Picture 1: </td>
            <td><?loadImage2($Picture1,$rela_path . $PIC_DIR. $table . "/")?></td>
          </tr>
          <tr> 
            <td class="tdheader">Picture 2: </td>
            <td><?loadImage2($Picture2,$rela_path . $PIC_DIR. $table . "/")?></td>
          </tr>
          <tr> 
            <td class="tdheader">Picture 3: </td>
            <td><?loadImage2($Picture3,$rela_path . $PIC_DIR. $table . "/")?></td>
          </tr>
          <tr> 
            <td class="tdheader">Picture 4: </td>
            <td><?loadImage2($Picture4,$rela_path . $PIC_DIR. $table . "/")?></td>
          </tr>


          <tr> 
            <td class="tdheader">Publish :</td>
            <td> <?echo $Status?>
			</td>
          </tr>
		  <tr> 
            <td class="tdheader">Publishing Date : </td>
            <td><?print(OutDate($Publish_date))?></td>
          </tr>



















          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>

</form>
<!--Content End-->
<?require($rela_path . "inc/footer.php");?>
        